package com.util;

import org.apache.commons.codec.digest.DigestUtils;

/**
 * Created by asan on 2015-06-13.
 */
public class CustomerTicketUtil {

    public static String getTicket(Integer id)
    {
       return DigestUtils.md5Hex(id+SystemConstant.LOGIN_TICKET);
    }

    public static boolean validateTicket(Integer id,String ticket)
    {
        return getTicket(id).equals(ticket);
    }
}
